\documentclass[tikz,border=2mm]{standalone}
\usepackage{array,amsmath,mathptmx,xcolor,pifont,fontspec,xunicode-addon}
\usepackage{bbding}
\usepackage[UTF8]{ctex}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\usepackage{tikz-cd}
\usepackage{tikz,graphicx,subfig,caption} % Required for drawing custom shapes
\usetikzlibrary{fit,matrix,chains,arrows,shapes,positioning,arrows.meta,chains,shadows,shapes.callouts,decorations.text,shapes.symbols,shapes.misc, positioning,decorations.pathreplacing,calc,backgrounds,}
\definecolor{lightpink}{RGB}{255, 202, 203}
\definecolor{lightgreen}{RGB}{204, 255, 204}
\definecolor{lightgreen1}{RGB}{163, 196, 163}
% 额外添加
\usepackage{indentfirst}
\usepackage{diagbox}
\usepackage{pifont}


\begin{document}
	\begin{tikzpicture}[>=latex,every node/.style={anchor=south west,,inner sep=0}]
		
		\node(I0) [align=left] at (0,0){Z$'\rightarrow \cdot$Z \\ Z$\rightarrow \cdot$aBA};
		\node(I1) [align=left] at ([xshift=5em, yshift=0.6em]I0.south){Z$'\rightarrow$Z$\cdot$};
		
		\node(I2) [align=left] at ([xshift=3em, yshift=-4em]I0.south){Z$\rightarrow$a$\cdot$BA \\ B$\rightarrow \cdot$bB  \\ B$\rightarrow \cdot$c};
		\node(I3) [align=left] at ([xshift=3em, yshift=-1.5em]I2.east){Z$\rightarrow$aB$\cdot$A \\ A$\rightarrow \cdot$bc  \\ A$\rightarrow \cdot$c};
		\node(I4) [align=left] at ([xshift=3em, yshift=-0.4em]I3.east){Z$\rightarrow$aBA$\cdot$};
		\node(I5) [align=left] at ([xshift=3em, yshift=-0.4em]I4.east){Z$\rightarrow$aBAd};
		
		\node(I6) [align=left] at ([xshift=2em, yshift=-4em]I3.east){A$\rightarrow$b$\cdot$};
		\node(I7) [align=left] at ([xshift=3em, yshift=-0.4em]I6.east){A$\rightarrow$bc$\cdot$};
		
		\node(I8) [align=left] at ([xshift=2em, yshift=3em]I3.east){A$\rightarrow$c};
		
		\node(I9) [align=left] at ([xshift=3em, yshift=-11em]I2.east){B$\rightarrow$b$\cdot$B \\ B$\rightarrow \cdot$bB \\ B$\rightarrow \cdot$c};
		\node(I10) [align=left] at ([xshift=3em, yshift=-0.4em]I9.east){B$\rightarrow$bB$\cdot$};
		
		\node(I11) [align=left] at ([xshift=8em, yshift=-13em]I2.east){B$\rightarrow$c$\cdot$};
		
		%连接线
		\draw[->] (I0.east) -- node[above]{Z}(I1.west);
		\draw[->] (I0.south) |- (I2.west);
		\draw[->] (I2.east) -- node[above]{B}(I3.west);
		\draw[->] (I3.east) -- node[above]{A}(I4.west);
		\draw[->] (I4.east) -- node[above]{d}(I5.west);
		\draw[->] (I3.south) |- (I6.west);
		\draw[->] (I6.east) -- node[above]{c}(I7.west);
		\draw[->] (I2.south) |- (I9.west);
		\draw[->] (I9.east) -- node[above]{B}(I10.west);
		\draw[->] (I2.south) |- (I11.west);
		\draw[->] (I3.east) -- (I8.west);
		\draw[->] (I9.east) -- (I11.west);
		\path
		(I9) edge [loop above] node{b} ();
		
		% 额外的数据
		\node(+) at ([xshift=-1.5em,yshift=-0.5em]I0.west){\small{+}};
		\node(OK) at ([xshift=0.5em,yshift=0em]I1.east){\small{OK}};
		\node(a) at ([xshift=-1.5em,yshift=0em]I2.west){\small{a}};
		\node(c) at ([xshift=0.5em,yshift=0.5em]I3.east){\small{c}};
		\node(c1) at ([xshift=0.8em,yshift=-0.85em]I9.east){\small{c}};
		\node(r3) at ([xshift=0.4em,yshift=0em]I8.east){\small{r(3)}};
		\node(r1) at ([xshift=0.4em,yshift=0em]I5.east){\small{r(1)}};
		\node(r2) at ([xshift=0.4em,yshift=0em]I7.east){\small{r(2)}};
		\node(b1) at ([xshift=-1.5em,yshift=0em]I6.west){\small{b}};
		\node(b2) at ([xshift=-1.5em,yshift=0em]I9.west){\small{b}};
		\node(c) at ([xshift=-3.5em,yshift=0em]I11.west){\small{c}};
		\node(r4) at ([xshift=0.4em,yshift=0em]I10.east){\small{r(4)}};
		\node(r5) at ([xshift=0.4em,yshift=0em]I11.east){\small{r(5)}};
		
		\node(p0) at ([xshift=0em,yshift=1.2em]I0.east) {\color{red}$I_0$};
		\node(p1) at ([xshift=0em,yshift=1.2em]I1.east) {\color{red}$I_1$};
		\node(p2) at ([xshift=0em,yshift=1.2em]I2.east) {\color{red}$I_2$};
		\node(p3) at ([xshift=0em,yshift=1.2em]I3.east) {\color{red}$I_3$};
		\node(p4) at ([xshift=0em,yshift=1.2em]I4.east) {\color{red}$I_4$};
		\node(p5) at ([xshift=0em,yshift=1.2em]I5.east) {\color{red}$I_5$};
		\node(p6) at ([xshift=0em,yshift=1.2em]I6.east) {\color{red}$I_6$};
		\node(p7) at ([xshift=0em,yshift=1.2em]I7.east) {\color{red}$I_7$};
		\node(p8) at ([xshift=0em,yshift=1.2em]I8.east) {\color{red}$I_8$};
		\node(p9) at ([xshift=0em,yshift=1.2em]I9.east) {\color{red}$I_9$};
		\node(p10) at ([xshift=0em,yshift=1.2em]I10.east) {\color{red}$I_{10}$};
		\node(p11) at ([xshift=0em,yshift=1.2em]I11.east) {\color{red}$I_{11}$};
		
		
		
		\begin{pgfonlayer}{background}
			\node [draw, fill=lightpink,fit=(I0)(I1)(I2)(I3)(I4)(I5)(I6)(I7)(I8)(I9)(I10)(I11)(r1)(r2)(r3)(+)(p1)(p2)(p8),inner sep=0.3em] {};
			
			\node [draw, fill=lightgreen,fit=(I0),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I1),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I2),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I3),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I4),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I5),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I6),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I7),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I8),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I9),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I10),inner sep=0.3em] {};
			\node [draw, fill=lightgreen,fit=(I11),inner sep=0.3em] {};
		\end{pgfonlayer}
		
		
		
	\end{tikzpicture}
\end{document}